//
//  searchModel.h
//  RouteSearcher
//
//  Created by wenqingzhou on 2/14/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GeocodeModel.h"


@interface searchModel : NSObject <NSXMLParserDelegate>{
	NSString *fromXCode;
	NSString *fromYCode;
	NSString *toXCode;
	NSString *toYCode;
	NSString *time;
	NSString *date;
	NSString *timeType;
	NSMutableArray *tmp;
	NSInteger fromOrTo; //which text is being set:	1=from 2=to
}

@property (retain) NSString *fromXCode,*fromYCode,*toXCode,*toYCode,*timeType,*time,*date;
@property (assign) NSMutableArray *tmp,*arrayOfFromAddress,*arrayOfToAddress;
@property (assign) NSInteger fromOrTo;
-(void)stringToGeocode:(NSString *)str;
-(NSString *)getAddressFromTmpArrayObjectAtIndex:(NSInteger)index;
-(NSArray *)getFirstAddressFromTmpArrayObjectAtIndex:(NSInteger)index;
+(searchModel *)initWithString:(NSString *)itimeType;
-(NSURL *)getRequestURLOfRoute;
-(NSString *)updateDate:(NSDate *)myDate;
@end
